package mainmeal;

import mainmeal.factory.IFactory;
import mainmeal.factory.impl.BreadFactory;
import mainmeal.factory.impl.MealFactory;
import mainmeal.factory.impl.MilkDealFactory;

public class Test {
    public static void main(String[] args) {
        IFactory milkDealFactory = new MilkDealFactory();
        System.out.println(milkDealFactory.getFood().getInfo());
        System.out.println(milkDealFactory.getTool().getUseful());
        System.out.println("-------------");
        IFactory mealFactory = new MealFactory();
        System.out.println(mealFactory.getFood().getInfo());
        System.out.println(mealFactory.getTool().getUseful());
        System.out.println("-------------");
        IFactory breadFactory = new BreadFactory();
        System.out.println(breadFactory.getFood().getInfo());
        System.out.println(breadFactory.getTool().getUseful());
    }
}
